<template>
  <div>
    <div class="title">周末去哪儿</div>
    <div class="week-item" v-for="item in weekendGoods" :key="item.goodsId">
      <div class="img">
        <img :src="item.image" alt>
      </div>
      <div class="desc">
        <p class="tit">{{item.slogan1}}</p>
        <p class="slog">{{item.slogan2}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeWeekend",
  props: { weekendGoods: Array }
};
</script>

<style lang="stylus" scoped>
.title {
  padding: 0.2rem 0 0.2rem 0.3rem;
}

.img {
  height: 0;
  overflow: hidden;
  padding-bottom: 35%;
}

.img img {
  width: 100%;
}

.desc {
  padding: 0.2rem 0 0.1rem 0.3rem;
  background-color: #fff;
}

.desc p {
  margin-bottom: 0.1rem;
}

.slog {
  overflow: hidden;
  padding-right: 1.4rem;
  color: #616161;
  font-size: 0.24rem;
  line-height: 0.24rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.week-item {
  margin-bottom: 0.2rem;
}
</style>